using I2.Loc;
using UnityEngine;

public class MarketGunMiniInfoPanel : MarketMiniInfoPanel
{
	public UILabel lethalyCount;

	public UILabel fireRateCount;

	public UILabel mobilityCount;

	public UILabel ammoCount;

	public UILabel ammoLabel;

	public GameObject damageInfo;

	public GameObject ammoInfo;

	public UISprite weaponTypeSprite;

	public UILabel weaponTypeLabel;

	public void SetInfo(Product product)
	{
		currentProduct = product;
		ProductWeapon productWeapon = (ProductWeapon)product;
		if (productWeapon.shotType == ShotType.Spread)
		{
			lethalyCount.text = (productWeapon.damage * (float)productWeapon.bulletsPerShot).ToString();
		}
		else
		{
			lethalyCount.text = productWeapon.damage.ToString();
		}
		fireRateCount.text = productWeapon.fireRate.ToString("F0");
		mobilityCount.text = productWeapon.mobility.ToString();
		ammoCount.text = productWeapon.ammo.ToString();
		ammoInfo.SetActive(productWeapon.ammo != 0f);
		ammoInfo.SetActive(productWeapon.ammo != 0f);
		SetRareType();
		if ((bool)weaponTypeSprite)
		{
			weaponTypeSprite.spriteName = "ShotType_" + productWeapon.shotType;
		}
		if ((bool)weaponTypeLabel)
		{
			weaponTypeLabel.text = ScriptLocalization.Get("Market/ShotType_" + productWeapon.shotType);
		}
		SetTitleLocalization();
	}
}
